Skip to content

fix: isolate sessions by header cwd - #157

Closed
dangzitou wants to merge 1 commit into
stepfun-ai:mainfrom
dangzitou:fix/session-cwd-isolation
Closed

dangzitou wants to merge 1 commit into
stepfun-ai:mainfrom
dangzitou:fix/session-cwd-isolation

Conversation

@dangzitou

@dangzitou dangzitou commented Sep 23, 2026 •

Copy link
Copy Markdown

Summary

  • Filter current-project session listing and --continue by the session header's actual cwd, even in a default encoded directory. Two paths such as project-a and project/a encode to the same session directory and could previously select — and append to — each other's sessions.
  • Add a regression test for both the native and the Step session manager, covering the default and the explicit --session-dir path, the cross-project append case, and the "only the other project has a session" case. listAll stays unscoped on purpose and the test pins that.

Behavior change

Sessions whose header carries no cwd (or whose recorded cwd no longer matches — e.g. after the project directory was renamed or moved) no longer appear in list and are not resumed by --continue. They remain visible through listAll. Previously such files were resumable from any project whose encoded directory collided with theirs, which is exactly the bug being fixed.

Verification

  • Reproduced the bug in five independent runs before the fix.
  • npm run check
  • ./test.sh — full workspace suite green (coding-agent: 274 files / 3496 tests, apps/cli: 624 tests).

Fixes #156.

@dangzitou
dangzitou force-pushed the fix/session-cwd-isolation branch from ee2fd95 to 30966a7 Compare September 24, 2026 19:23
@ZouR-Ma

ZouR-Ma commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Thank you for taking the time to submit this PR and for supporting Step-Code! We are temporarily not accepting pull requests, so we will not be able to proceed with this change at the moment. Please stay tuned for future updates. We appreciate your understanding and support.

@ZouR-Ma ZouR-Ma closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] --continue can append to another project session when paths collide

2 participants